home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / DBL Pascal Library / ErrSignal / ErrSignal.p < prev    next >
Text File  |  1992-04-26  |  1KB  |  60 lines

  1. unit ErrSignal;
  2.  
  3. { Copyright © 1989, 1991 David B. Lamkins                            }
  4.  
  5. { This unit is adapted by David B. Lamkins from Apple’s Macintosh    }
  6. { Technical Note #88 by Rick Blair.      See the documentation            }
  7. { accompanying this unit for a detailed description.                     }
  8.  
  9. interface
  10.  
  11.     const
  12.         sigFail = 200;        { May be used as argument to InitSignals…        }
  13.  
  14.     procedure InitSignals (failCode: Integer);
  15.  
  16.     function CatchSignal: Integer;
  17.     procedure FreeCatch;
  18.  
  19.     procedure SignalHandlerDone;
  20.     procedure TerminateSignalHandler;
  21.  
  22.     procedure Signal (code: Integer);
  23.     procedure SignalWhen (code: Integer; condition: Boolean);
  24.     procedure SignalUnless (code: Integer; condition: Boolean);
  25.     procedure SignalMem;
  26.     procedure SignalRes;
  27.     procedure SignalNIL (p: univ Ptr);
  28.     procedure SignalNILRes (h: univ Handle);
  29.  
  30.     procedure ReSignal;
  31.     procedure PassSignal (code: Integer);
  32.     procedure PassMemSignal;
  33.     procedure PassResSignal;
  34.  
  35.     function IdentifySignaller: Longint;
  36.     function LastSignalCode: Integer;
  37.     function HandlingSignal: Boolean;
  38.     function CatchInBlock: Boolean;
  39.     function CatchDepth: Integer;
  40.  
  41.     procedure TrimCatchMemory;
  42.  
  43.     const
  44.         esStopInTHINKProject = 128;
  45.         esStopInApplication = 64;
  46.         esStopAtSignal = 4;
  47.         esStopAtReSignal = 2;
  48.         esStopAtError = 1;
  49.     function SetSignalStops (stopsMask: Integer): Integer;
  50.  
  51.     function RegisterCleanupAction (p: ProcPtr): Integer;
  52.     procedure Cleanup (value: univ Longint; action: Integer);
  53.  
  54.     procedure Ignore (value: univ Longint);
  55.  
  56. implementation
  57.  
  58. { all routines are external }
  59.  
  60. end.